FROM golang:1.24-alpine AS builder

WORKDIR /app
COPY . .
ENV GOPROXY https://goproxy.cn,direct
RUN go build -o pfb ./cmd/pfb

FROM alpine:3.18

WORKDIR /app
COPY --from=builder /app/pfb .
COPY web/ web/

EXPOSE 8080
CMD ["./pfb"]